import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { IsNotEmpty, IsOptional, IsString, IsUUID, MaxLength } from 'class-validator';

export class CreateTaskTemplateDto {
  @ApiProperty({
    description: 'Task template title',
    maxLength: 128,
    example: 'Monthly Report Template',
  })
  @IsString()
  @IsNotEmpty()
  @MaxLength(128)
  title: string;

  @ApiPropertyOptional({
    description: 'Task template description',
    example: 'Template for creating monthly reports',
  })
  @IsString()
  @IsOptional()
  description?: string;

  @ApiPropertyOptional({
    description: 'Task category ID',
    format: 'uuid',
    example: '123e4567-e89b-12d3-a456-426614174000',
  })
  @IsUUID()
  @IsOptional()
  taskCategoryId?: string;
}
